﻿using Merbla.IOC.Logic;
using StructureMap;

namespace Merbla.IOC.StructureMap.Console
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            ObjectFactory.Initialize(x =>
                {
                    x.ForRequestedType<ILogger>().TheDefaultIsConcreteType<ConsoleLogger>();
                    x.ForRequestedType<IProductManager>().TheDefaultIsConcreteType<ProductManager>();
                }
                );


            var manager = ObjectFactory.GetInstance<IProductManager>();

            manager.ShipProduct(new Product {Name = "My Product"});
        }
    }
}